package com.eshop.service.Impl;

import com.eshop.dao.Impl.UserDaoImpl;
import com.eshop.dao.UserDao;
import com.eshop.model.User;
import com.eshop.service.RegisterService;

public class RegisterServiceImpl implements RegisterService {
    UserDao userDao = new UserDaoImpl();

    @Override
    public boolean IfUsernameExists(String username) {
        return userDao.queryUserByUsername(username) != null;
    }

    @Override
    public void AddUser(User user) {
        userDao.addUser(user);
    }
}
